package homework.day10;

public class Test03 {
    public static void main(String[] args) {
        String a="Welcome";

        char[] arr = a.toCharArray();
        String Str="";
        //把 arr +3转换为Str数组
        for (int i = 1; i < arr.length; i++) {
           Str+= (char) (arr[i]+3);
        }
        //
        Str+=(char)(arr[0]+3);

        System.out.println(Str);
        //加密后数据拆分为char类型
        char[] temp= Str.toCharArray();

        String temp2=""+(char)(temp[Str.length()-1]-3);
        //将char字符转回去拼接
        for (int i = 0; i < Str.length()-1; i++) {
          temp2 += (char)(temp[i]-3);
        }
        System.out.println(temp2);

    }

}
